
// 系统用的常量
enum CoordinateSystem {
    SOLID_COLOR = "#ccc", // 实线颜色
    DASHED_COLOR = "#f0f0f0", // 虚线颜色
    ZERO_COLOR = "#358bf3", // 坐标系颜色
    GRID_SIZE = 4,  // N*N的网格组,网格大小
    MAX_SCALESIZE = 40,  // 最大放大比例
    MIN_SCALESIZE = 3,  // 最小缩小比例
    SCALE_ABILITY = 1.5,  // 缩放快慢
    NATIVE_SCALE = 10,  // 原始缩放大小
    ERROR_RANGE = .25,  // 误差范围, 辅助线对齐判断
    DRAW_INTERVAL = 1,  // 绘制的最小时间间隔
    AREA_FILL_COLOR = "rgba(145,202,255, .5)",  // 区域选择的rect填充色
}

// 控制点方位
enum FontFamily {
    HEITI= "黑体",
    SONGTI= "宋体",
    KAITI= "楷体",
    SHISHANG = "shishang",
    YOUSHE = "youshe",
    ZONGYI = "zongyi",
}

// 控制点方位
enum ControlPoint {
    LEFT_TOP_POINT = "leftTopPoint",
    LEFT_BOTTOM_POINT = "leftBottomPoint",
    RIGHT_TOP_POINT = "rightTopPoint",
    RIGHT_BOTTOM_POINT = "rightBottomPoint",
    ROTATE_POINT = "rotatePoint",
    ROTATE_DIST = 25
}

// 元素的类型,小类
enum BlockType {
    RECT = "rect",
    CIRCLE = "circle",
    IMAGE = "image",
    TEXT = "text",
    LINE = "line",
    LINK = "link",
    TRIANGLE = "triangle",
    POLYGON = "polygon",
    ARROW = "arrow",
    CUSTOM = "custom",
}

// 元素分类,大类: 点状的,圆形的,线性的
enum BlockCategory {
    RECT = 'rect',
    CIRCLE = 'circle',
    POLYGON = 'polygon'
}

// 操作的类型
enum OperateType {
    ADD = "add",
    DEL = "del",
    UPDATE = "update",
}

// link的起点终点标识
enum LinkMark {
    START = "start",
    END = 'end',
}

// 自定义事件名称
enum MyEvent {
    DRAW_LINK = 'draw-link',
    POINT_DOWN = 'point-down',
    DRAW_AREA = 'draw-area',
    DB_CLICK = 'db-click'
}

// 线段样式
enum LinkStyle {
    STRAIGHT = 'straight',  // 直线
    BROKEN = 'broken', // 折线
    CURVE = 'curve'  // 曲线
}

export {
    CoordinateSystem,
    ControlPoint,
    BlockType,
    OperateType,
    LinkMark,
    MyEvent,
    BlockCategory,
    LinkStyle,
    FontFamily
}